Skip to content

Surface package changelogs on docs site#6636

Merged
masenf merged 11 commits into
mainfrom
claude/lucid-hypatia-xq0xzi
Jul 1, 2026
Merged

Surface package changelogs on docs site#6636
masenf merged 11 commits into
mainfrom
claude/lucid-hypatia-xq0xzi

Conversation

@masenf

@masenf masenf commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Description

This PR adds changelog discovery and rendering to the docs site, making package changelogs accessible at /docs/changelog/ instead of requiring users to visit GitHub releases.

What changed:

  1. New reflex_docs/changelogs.py module — Discovers and normalizes changelogs:

    • discover_repo_changelogs() finds towncrier-managed changelogs in the monorepo (repo root + packages/*/CHANGELOG.md)
    • find_distribution_changelog() locates changelogs shipped with installed distributions (e.g., reflex-enterprise)
    • discover_changelogs() combines both sources, ordering reflex first then alphabetically
    • normalize_changelog() ensures consistent H1 headings across different changelog formats (towncrier vs. Keep-a-Changelog)
  2. Changelog rendering in docs — Integrated into the docs pipeline:

    • New handle_changelog_doc() handler normalizes changelog markdown and limits TOC to version headings (H2 and above)
    • Changelogs are registered as virtual docs under docs/changelog/ with the main reflex changelog at the section index
    • Updated footer link to point to /changelog/ instead of GitHub releases
  3. Sidebar navigation — Added changelog section to the docs sidebar:

    • New get_sidebar_items_changelog() dynamically generates sidebar items from discovered packages
    • Changelog routes are treated as API reference content for sidebar styling
  4. Helper function — Added render_markdown_with_toc() to extract heading structure while rendering markdown

  5. Documentation — Updated CONTRIBUTING.md to explain where changelogs are published

Tests

  • Added comprehensive test suite in docs/app/tests/test_changelogs.py covering:
    • Repo changelog discovery (monorepo structure)
    • Distribution changelog discovery (installed packages)
    • Changelog normalization (towncrier and Keep-a-Changelog formats)
    • Page title generation
    • Edge cases (missing distributions, stale file records, no file metadata)
  • Added route validation test in test_routes.py to ensure all discovered changelogs are served
  • Added section naming test in test_agent_files.py for root-level markdown docs

All tests pass with the changes.

Related issues

Closes the need for users to navigate to GitHub releases for changelog information.

https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7

At startup the docs app now reaches up to the repo root and pulls in the
towncrier-managed changelogs (repo-root CHANGELOG.md plus each
packages/*/CHANGELOG.md), serving them through the regular docgen pipeline:

- /changelog/ renders the main reflex changelog; each subpackage gets
  /changelog/<package>/. New package changelogs appear automatically.
- The reflex-enterprise changelog is read from the installed distribution
  (via its dist RECORD) instead of a checked-in copy, so it can never go
  stale; the page appears once the published wheel ships a CHANGELOG.md.
- Changelog markdown is normalized with a canonical H1 title, and the
  on-page TOC is limited to version headings.
- Pages are listed in a Changelog section of the API Reference sidebar,
  included in llms.txt/llms-full.txt and .md asset serving, and the
  footer/navbar Changelog links now point at the new page instead of
  GitHub releases.

https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
@masenf masenf requested review from a team and Alek99 as code owners June 9, 2026 19:23
@codspeed-hq

codspeed-hq Bot commented Jun 9, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 7.79%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

#### 🎉 Hooray! `pytest-codspeed` just leveled up to 5.0.3!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

⚡ 6 improved benchmarks
✅ 20 untouched benchmarks
⏩ 8 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
test_from_event_type[lambda_event] 29.3 µs 25.8 µs +13.45%
test_from_event_type[event] 29.4 µs 26 µs +13.09%
test_from_event_type[event_spec] 52.3 µs 48.9 µs +6.82%
test_from_event_type[lambda_event_spec] 54.3 µs 51 µs +6.36%
test_from_event_type[event_handler] 94.9 µs 91.3 µs +3.89%
test_from_event_type[lambda_event_handler] 95.4 µs 92.1 µs +3.59%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/lucid-hypatia-xq0xzi (42357a9) with main (251d0f5)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR surfaces package changelogs on the docs site at /docs/changelog/, replacing the previous GitHub releases link in the footer. It introduces a new changelogs.py discovery module, a render_markdown_with_toc() helper, changelog-aware doc handling, and a new sidebar section.

  • Changelog discovery (changelogs.py) finds towncrier-managed files in the monorepo (CHANGELOG.md and packages/*/CHANGELOG.md) and distribution-shipped files (e.g. reflex-enterprise), ordering reflex first then alphabetically; depth-based preference prevents vendored third-party changelogs from shadowing the package-level one.
  • Rendering normalizes H1 headings via normalize_changelog(), limits TOC to version headings (H2 and above), and registers changelogs as virtual docs under docs/changelog/ at module import time.
  • Tests cover discovery, depth preference, normalization, route registration, and sidebar section naming with comprehensive edge-case coverage.

Confidence Score: 5/5

Safe to merge; the change adds read-only changelog rendering with no mutations to app state or data.

All new code follows established patterns in the codebase, edge cases (missing files, stale distribution records, empty sources) are handled, and the test suite covers both unit and integration paths including route validation. The removal of the TYPE_CHECKING-gated import in test_app.py is safe because that file has from future import annotations.

No files require special attention.

Important Files Changed

Filename Overview
docs/app/reflex_docs/changelogs.py New module for discovering and normalizing package changelogs; handles monorepo and installed-distribution sources with correct depth-preference logic.
docs/app/reflex_docs/pages/docs/init.py Integrates changelog discovery and rendering into the doc pipeline; adds a module-level loop that populates all_docs and manual_titles for changelog pages.
docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/reference.py Adds get_sidebar_items_changelog() that generates sidebar items from discovered changelog packages; evaluated once at module load.
docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py Adds changelog_index parameter to sidebar_comp and a new changelog sidebar section; changelog routes use api-reference sidebar styling.
docs/app/reflex_docs/docgen_pipeline.py Adds render_markdown_with_toc() helper that extracts TOC headings while rendering markdown.
docs/app/tests/test_changelogs.py Comprehensive test suite for changelog discovery and normalization including edge cases (stale records, missing distributions, depth preference).
docs/app/tests/test_routes.py Adds test_changelog_routes to validate all discovered changelogs are served under /changelog/.
tests/units/test_app.py Removes TYPE_CHECKING-gated AuthProvider import; safe because the file has from future import annotations at the top.
packages/reflex-site-shared/src/reflex_site_shared/constants.py Updates CHANGELOG_URL constant from GitHub releases to the new docs-site path.
pyproject.toml Tightens wrapt upper bound to <2.2 and adds reflex-enterprise to the optional-packages list in the uv workspace config.

Reviews (7): Last reviewed commit: "remove useless TYPE_CHECKING import of A..." | Re-trigger Greptile

Comment thread docs/app/reflex_docs/changelogs.py
Comment thread docs/app/reflex_docs/changelogs.py
Comment thread docs/app/reflex_docs/changelogs.py Outdated
claude and others added 4 commits June 9, 2026 19:30
A wheel can vendor third-party changelogs deeper in its tree (e.g. bundled
frontend assets); picking the first RECORD match could surface the wrong
file. Sort candidates by path depth so the package-level changelog wins.

https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
The 0.9.0.post1 wheel ships reflex_enterprise/CHANGELOG.md, so the docs
site now renders the enterprise changelog at /changelog/reflex-enterprise/.
Exempt reflex-enterprise from the exclude-newer cutoff like the other
internal lockstep packages.

https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
reflex-enterprise 0.9.0 restricts `reflex run --env prod` to paid tiers,
which broke the reflex-docs integration jobs after the version bump. The
gate explicitly exempts reflex's own integration tests via the app
harness flag, so set it for every job that boots the docs app in prod.

https://claude.ai/code/session_01ToXo8Yg1VTuuT2jgBqK6T7
@adhami3310 adhami3310 added the documentation Improvements or additions to documentation label Jun 24, 2026
masenf added 6 commits July 1, 2026 10:14
wrapt 2.2 adds generic typing to ObjectProxy and needs some code change to pass pyright
these upgrades introduced pre-commit issues, will upgrade separately and
mitigate the changes in code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class changelog discovery and rendering to the Reflex docs site so users can browse package changelogs under /docs/changelog/ instead of GitHub releases, including support for monorepo Towncrier changelogs and (optionally) an installed reflex-enterprise distribution changelog.

Changes:

  • Introduces reflex_docs/changelogs.py for changelog discovery, ordering, and H1 normalization.
  • Registers discovered changelogs as virtual docs under docs/changelog/, renders them with a constrained TOC, and exposes them via sidebar + footer updates.
  • Adds/updates tests and CI config to validate changelog routing and ensure integration workflows run with the required harness flag.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/units/test_app.py Removes redundant TYPE_CHECKING import block for AuthProvider.
pyproject.toml Adjusts dependency constraint for wrapt; exempts reflex-enterprise from uv’s exclude-newer floor window.
packages/reflex-site-shared/src/reflex_site_shared/constants.py Updates the canonical changelog URL to the docs site route.
docs/app/tests/test_routes.py Adds a route-level assertion ensuring all discovered changelogs are served under /changelog/.
docs/app/tests/test_changelogs.py Adds unit tests for changelog discovery (repo + distribution), ordering, and normalization.
docs/app/tests/test_agent_files.py Adds regression coverage for section naming on root-level markdown docs.
docs/app/reflex_docs/templates/docpage/sidebar/sidebar.py Adds a “Changelog” sidebar section and treats changelog routes as API-reference-styled content.
docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/reference.py Generates sidebar items for changelogs based on discovered packages.
docs/app/reflex_docs/templates/docpage/docpage.py Updates footer “Changelog” link to point to /changelog/.
docs/app/reflex_docs/pages/docs/init.py Registers changelog virtual docs and adds a specialized handler for changelog rendering/TOC shaping.
docs/app/reflex_docs/docgen_pipeline.py Adds render_markdown_with_toc() helper for rendering plus heading extraction.
docs/app/reflex_docs/changelogs.py New module implementing changelog discovery + normalization logic.
docs/app/pyproject.toml Pins reflex-enterprise to a minimum version for docs app builds.
docs/app/agent_files/_plugin.py Ensures llms.txt section naming strips .md for root-level docs (e.g. changelog.md).
CONTRIBUTING.md Documents where changelogs are published and how the docs site sources them.
.github/workflows/integration_tests.yml Sets APP_HARNESS_FLAG to allow integration tests to run in prod mode when enterprise restrictions apply.
.github/workflows/check_outdated_dependencies.yml Sets APP_HARNESS_FLAG for dependency-check workflow parity with CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/app/reflex_docs/pages/docs/__init__.py
Comment thread pyproject.toml
@masenf masenf merged commit 6748919 into main Jul 1, 2026
109 checks passed
@masenf masenf deleted the claude/lucid-hypatia-xq0xzi branch July 1, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants